package com.ny.zuoye2567.dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class DbUntil {

    private static final  String URL = "jdbc:mysql://localhost:3306/usersDb";
    private static final String DB_USERNAME = "root";
    private static final String DB_PASSWORD = "123456";
    public Connection getCon() throws ClassNotFoundException, SQLException{
        Class.forName("com.mysql.cj.jdbc.Driver");
        Connection conn = DriverManager.getConnection(URL,DB_USERNAME,DB_PASSWORD);

        return  conn;
    }

}
